package net.zabuchy.issue.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the issue_links database table.
 * 
 */
@Entity
@Table(name="issue_links")
public class IssueLink implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private int issueLinksId;
	private String comment;
	private int link;
	private Issue issue;

    public IssueLink() {
    }

    public IssueLink(String comment, int link, Issue issue) {
		super();
		this.comment = comment;
		this.link = link;
		this.issue = issue;
	}
    
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="ISSUE_LINKS_ID")
	public int getIssueLinksId() {
		return this.issueLinksId;
	}

	public void setIssueLinksId(int issueLinksId) {
		this.issueLinksId = issueLinksId;
	}


	@Column(name="COMMENT")
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}


	@Column(name="LINK")
	public int getLink() {
		return this.link;
	}

	public void setLink(int link) {
		this.link = link;
	}


	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ISSUE_ID", nullable = false)
	public Issue getIssue() {
		return this.issue;
	}

	public void setIssue(Issue issue) {
		this.issue = issue;
	}
	
}